<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Simple Framework: Assets/Scripts/Core/ProcedureBase.cs 源文件</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="logo.gif"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Simple Framework
   &#160;<span id="projectnumber">v0.1.1</span>
   </div>
   <div id="projectbrief">A simple Unity application framework</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'搜索');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','搜索');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('_procedure_base_8cs_source.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="headertitle">
<div class="title">ProcedureBase.cs</div>  </div>
</div><!--header-->
<div class="contents">
<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="keyword">using</span> <a class="code" href="namespace_unity_engine.html">UnityEngine</a>;</div><div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;</div><div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="keyword">namespace </span><a class="code" href="namespace_framework.html">Framework</a>.Core</div><div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;{</div><div class="line"><a name="l00008"></a><span class="lineno"><a class="line" href="class_framework_1_1_core_1_1_procedure_base.html">    8</a></span>&#160;    <span class="keyword">public</span> <span class="keyword">abstract</span> <span class="keyword">class </span><a class="code" href="class_framework_1_1_core_1_1_procedure_base.html">ProcedureBase</a></div><div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;    {</div><div class="line"><a name="l00013"></a><span class="lineno"><a class="line" href="class_framework_1_1_core_1_1_procedure_base.html#a99ca0d80da3fbadb5ec1b768c4a017f3">   13</a></span>&#160;        <span class="keyword">protected</span> <a class="code" href="class_framework_1_1_core_1_1_u_i_base.html">UIBase</a> <a class="code" href="class_framework_1_1_core_1_1_procedure_base.html#a99ca0d80da3fbadb5ec1b768c4a017f3">UI</a>;</div><div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;</div><div class="line"><a name="l00018"></a><span class="lineno"><a class="line" href="class_framework_1_1_core_1_1_procedure_base.html#a1846cc71809d7c8c7a9088a2fedca8ed">   18</a></span>&#160;        <span class="keyword">protected</span> <a class="code" href="interface_framework_1_1_core_1_1_i_message_queue.html">IMessageQueue</a> <a class="code" href="class_framework_1_1_core_1_1_procedure_base.html#a1846cc71809d7c8c7a9088a2fedca8ed">MessageQueue</a>;</div><div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;</div><div class="line"><a name="l00023"></a><span class="lineno"><a class="line" href="class_framework_1_1_core_1_1_procedure_base.html#a626d093ec90f08d6e43fd30287ca1dc5">   23</a></span>&#160;        <span class="keyword">public</span> <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="class_framework_1_1_core_1_1_procedure_base.html#a626d093ec90f08d6e43fd30287ca1dc5">OnInit</a>()</div><div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;        {</div><div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;        }</div><div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;</div><div class="line"><a name="l00030"></a><span class="lineno"><a class="line" href="class_framework_1_1_core_1_1_procedure_base.html#a59c0ed92afa84beb59b02e08a7c69f0c">   30</a></span>&#160;        <span class="keyword">public</span> <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="class_framework_1_1_core_1_1_procedure_base.html#a59c0ed92afa84beb59b02e08a7c69f0c">OnEnter</a>()</div><div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;        {</div><div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;        }</div><div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;</div><div class="line"><a name="l00038"></a><span class="lineno"><a class="line" href="class_framework_1_1_core_1_1_procedure_base.html#aa41b6e3bdc986f5db020eb8e5a82a5ec">   38</a></span>&#160;        <span class="keyword">public</span> <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="class_framework_1_1_core_1_1_procedure_base.html#aa41b6e3bdc986f5db020eb8e5a82a5ec">OnUpdate</a>(<span class="keywordtype">float</span> elapseSeconds)</div><div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;        {</div><div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;        }</div><div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;</div><div class="line"><a name="l00045"></a><span class="lineno"><a class="line" href="class_framework_1_1_core_1_1_procedure_base.html#afc9cad8f67cbf3c5bc6414e887ea1790">   45</a></span>&#160;        <span class="keyword">public</span> <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="class_framework_1_1_core_1_1_procedure_base.html#afc9cad8f67cbf3c5bc6414e887ea1790">OnLeave</a>()</div><div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160;        {</div><div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160;            ReleaseDefault();</div><div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;        }</div><div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160;</div><div class="line"><a name="l00053"></a><span class="lineno"><a class="line" href="class_framework_1_1_core_1_1_procedure_base.html#acb719345c3d415699034066db313d506">   53</a></span>&#160;        <span class="keyword">public</span> <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="class_framework_1_1_core_1_1_procedure_base.html#acb719345c3d415699034066db313d506">OnDestroy</a>()</div><div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160;        {</div><div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;        }</div><div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;</div><div class="line"><a name="l00063"></a><span class="lineno"><a class="line" href="class_framework_1_1_core_1_1_procedure_base.html#a52d9cfc5e1e72b4bfdbac1d2b9c431b8">   63</a></span>&#160;        <span class="keyword">protected</span> <a class="code" href="interface_framework_1_1_core_1_1_i_message_queue.html">IMessageQueue</a> SetDefault&lt;TEventType&gt;(<span class="keywordtype">string</span> ui = null) where TEventType : <span class="keyword">struct</span></div><div class="line"><a name="l00064"></a><span class="lineno">   64</span>&#160;        {</div><div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160;            MessageQueue = <a class="code" href="class_framework_1_1_core_1_1_message_manager.html">MessageManager</a>.<a class="code" href="class_framework_1_1_utilities_1_1_singleton.html#a3e8f42f51188ce789d8eceba2717356d">Instance</a>.Get&lt;TEventType&gt;();</div><div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160;            <span class="keywordflow">if</span> (ui != null)</div><div class="line"><a name="l00067"></a><span class="lineno">   67</span>&#160;            {</div><div class="line"><a name="l00068"></a><span class="lineno">   68</span>&#160;                UI = <a class="code" href="class_framework_1_1_core_1_1_u_i_manager.html">UIManager</a>.<a class="code" href="class_framework_1_1_utilities_1_1_mono_singleton.html#a35c9a8dcb36043b4834bdd8dd95331f8">Instance</a>.Open(ui);</div><div class="line"><a name="l00069"></a><span class="lineno">   69</span>&#160;            }</div><div class="line"><a name="l00070"></a><span class="lineno">   70</span>&#160;            <span class="keywordflow">return</span> MessageQueue;</div><div class="line"><a name="l00071"></a><span class="lineno">   71</span>&#160;        }</div><div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160;</div><div class="line"><a name="l00076"></a><span class="lineno">   76</span>&#160;        <span class="keyword">private</span> <span class="keywordtype">void</span> ReleaseDefault()</div><div class="line"><a name="l00077"></a><span class="lineno">   77</span>&#160;        {</div><div class="line"><a name="l00078"></a><span class="lineno">   78</span>&#160;            <span class="keywordflow">if</span> (MessageQueue != null)</div><div class="line"><a name="l00079"></a><span class="lineno">   79</span>&#160;            {</div><div class="line"><a name="l00080"></a><span class="lineno">   80</span>&#160;                <a class="code" href="class_framework_1_1_core_1_1_message_manager.html">MessageManager</a>.<a class="code" href="class_framework_1_1_utilities_1_1_singleton.html#a3e8f42f51188ce789d8eceba2717356d">Instance</a>.Dispose(MessageQueue);</div><div class="line"><a name="l00081"></a><span class="lineno">   81</span>&#160;            }</div><div class="line"><a name="l00082"></a><span class="lineno">   82</span>&#160;            <span class="keywordflow">if</span> (UI != null)</div><div class="line"><a name="l00083"></a><span class="lineno">   83</span>&#160;            {</div><div class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160;                <a class="code" href="class_framework_1_1_core_1_1_u_i_manager.html">UIManager</a>.<a class="code" href="class_framework_1_1_utilities_1_1_mono_singleton.html#a35c9a8dcb36043b4834bdd8dd95331f8">Instance</a>.Close(UI);</div><div class="line"><a name="l00085"></a><span class="lineno">   85</span>&#160;            }</div><div class="line"><a name="l00086"></a><span class="lineno">   86</span>&#160;        }</div><div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160;    }</div><div class="line"><a name="l00088"></a><span class="lineno">   88</span>&#160;}</div><div class="ttc" id="class_framework_1_1_core_1_1_u_i_base_html"><div class="ttname"><a href="class_framework_1_1_core_1_1_u_i_base.html">Framework.Core.UIBase</a></div><div class="ttdoc">所有UI父对象的基类。 </div><div class="ttdef"><b>Definition:</b> <a href="_u_i_base_8cs_source.html#l00011">UIBase.cs:11</a></div></div>
<div class="ttc" id="class_framework_1_1_core_1_1_procedure_base_html_a99ca0d80da3fbadb5ec1b768c4a017f3"><div class="ttname"><a href="class_framework_1_1_core_1_1_procedure_base.html#a99ca0d80da3fbadb5ec1b768c4a017f3">Framework.Core.ProcedureBase.UI</a></div><div class="ttdeci">UIBase UI</div><div class="ttdoc">默认UI </div><div class="ttdef"><b>Definition:</b> <a href="_procedure_base_8cs_source.html#l00013">ProcedureBase.cs:13</a></div></div>
<div class="ttc" id="class_framework_1_1_core_1_1_u_i_manager_html"><div class="ttname"><a href="class_framework_1_1_core_1_1_u_i_manager.html">Framework.Core.UIManager</a></div><div class="ttdoc">界面管理，提供管理界面和界面组的功能，如显示隐藏界面、激活界面。 </div><div class="ttdef"><b>Definition:</b> <a href="_u_i_manager_8cs_source.html#l00010">UIManager.cs:10</a></div></div>
<div class="ttc" id="class_framework_1_1_core_1_1_procedure_base_html_afc9cad8f67cbf3c5bc6414e887ea1790"><div class="ttname"><a href="class_framework_1_1_core_1_1_procedure_base.html#afc9cad8f67cbf3c5bc6414e887ea1790">Framework.Core.ProcedureBase.OnLeave</a></div><div class="ttdeci">virtual void OnLeave()</div><div class="ttdoc">每次离开这个流程时执行。 </div><div class="ttdef"><b>Definition:</b> <a href="_procedure_base_8cs_source.html#l00045">ProcedureBase.cs:45</a></div></div>
<div class="ttc" id="class_framework_1_1_core_1_1_procedure_base_html_aa41b6e3bdc986f5db020eb8e5a82a5ec"><div class="ttname"><a href="class_framework_1_1_core_1_1_procedure_base.html#aa41b6e3bdc986f5db020eb8e5a82a5ec">Framework.Core.ProcedureBase.OnUpdate</a></div><div class="ttdeci">virtual void OnUpdate(float elapseSeconds)</div><div class="ttdoc">每次更新时执行。 </div><div class="ttdef"><b>Definition:</b> <a href="_procedure_base_8cs_source.html#l00038">ProcedureBase.cs:38</a></div></div>
<div class="ttc" id="class_framework_1_1_core_1_1_procedure_base_html_a1846cc71809d7c8c7a9088a2fedca8ed"><div class="ttname"><a href="class_framework_1_1_core_1_1_procedure_base.html#a1846cc71809d7c8c7a9088a2fedca8ed">Framework.Core.ProcedureBase.MessageQueue</a></div><div class="ttdeci">IMessageQueue MessageQueue</div><div class="ttdoc">默认消息队列。 </div><div class="ttdef"><b>Definition:</b> <a href="_procedure_base_8cs_source.html#l00018">ProcedureBase.cs:18</a></div></div>
<div class="ttc" id="class_framework_1_1_core_1_1_procedure_base_html_acb719345c3d415699034066db313d506"><div class="ttname"><a href="class_framework_1_1_core_1_1_procedure_base.html#acb719345c3d415699034066db313d506">Framework.Core.ProcedureBase.OnDestroy</a></div><div class="ttdeci">virtual void OnDestroy()</div><div class="ttdoc">程序退出时执行，在程序退出时会完成所有流程初始化。 </div><div class="ttdef"><b>Definition:</b> <a href="_procedure_base_8cs_source.html#l00053">ProcedureBase.cs:53</a></div></div>
<div class="ttc" id="class_framework_1_1_core_1_1_procedure_base_html"><div class="ttname"><a href="class_framework_1_1_core_1_1_procedure_base.html">Framework.Core.ProcedureBase</a></div><div class="ttdoc">所有流程的基类。 </div><div class="ttdef"><b>Definition:</b> <a href="_procedure_base_8cs_source.html#l00008">ProcedureBase.cs:8</a></div></div>
<div class="ttc" id="interface_framework_1_1_core_1_1_i_message_queue_html"><div class="ttname"><a href="interface_framework_1_1_core_1_1_i_message_queue.html">Framework.Core.IMessageQueue</a></div><div class="ttdoc">消息队列的接口，由消息管理负责维护生命周期。 </div><div class="ttdef"><b>Definition:</b> <a href="_message_queue_8cs_source.html#l00244">MessageQueue.cs:244</a></div></div>
<div class="ttc" id="namespace_framework_html"><div class="ttname"><a href="namespace_framework.html">Framework</a></div></div>
<div class="ttc" id="class_framework_1_1_core_1_1_message_manager_html"><div class="ttname"><a href="class_framework_1_1_core_1_1_message_manager.html">Framework.Core.MessageManager</a></div><div class="ttdoc">消息管理，提供程序逻辑监听、抛出事件的机制，负责界面和功能实现的通信。 </div><div class="ttdef"><b>Definition:</b> <a href="_message_manager_8cs_source.html#l00012">MessageManager.cs:12</a></div></div>
<div class="ttc" id="class_framework_1_1_utilities_1_1_mono_singleton_html_a35c9a8dcb36043b4834bdd8dd95331f8"><div class="ttname"><a href="class_framework_1_1_utilities_1_1_mono_singleton.html#a35c9a8dcb36043b4834bdd8dd95331f8">Framework.Utilities.MonoSingleton.Instance</a></div><div class="ttdeci">static T Instance</div><div class="ttdoc">实例 </div><div class="ttdef"><b>Definition:</b> <a href="_singleton_8cs_source.html#l00064">Singleton.cs:64</a></div></div>
<div class="ttc" id="class_framework_1_1_core_1_1_procedure_base_html_a626d093ec90f08d6e43fd30287ca1dc5"><div class="ttname"><a href="class_framework_1_1_core_1_1_procedure_base.html#a626d093ec90f08d6e43fd30287ca1dc5">Framework.Core.ProcedureBase.OnInit</a></div><div class="ttdeci">virtual void OnInit()</div><div class="ttdoc">程序初始化时执行，在打开程序时会完成所有流程初始化。 </div><div class="ttdef"><b>Definition:</b> <a href="_procedure_base_8cs_source.html#l00023">ProcedureBase.cs:23</a></div></div>
<div class="ttc" id="class_framework_1_1_utilities_1_1_singleton_html_a3e8f42f51188ce789d8eceba2717356d"><div class="ttname"><a href="class_framework_1_1_utilities_1_1_singleton.html#a3e8f42f51188ce789d8eceba2717356d">Framework.Utilities.Singleton.Instance</a></div><div class="ttdeci">static T Instance</div><div class="ttdoc">实例 </div><div class="ttdef"><b>Definition:</b> <a href="_singleton_8cs_source.html#l00020">Singleton.cs:20</a></div></div>
<div class="ttc" id="class_framework_1_1_core_1_1_procedure_base_html_a59c0ed92afa84beb59b02e08a7c69f0c"><div class="ttname"><a href="class_framework_1_1_core_1_1_procedure_base.html#a59c0ed92afa84beb59b02e08a7c69f0c">Framework.Core.ProcedureBase.OnEnter</a></div><div class="ttdeci">virtual void OnEnter()</div><div class="ttdoc">当进入该流程时执行。 </div><div class="ttdef"><b>Definition:</b> <a href="_procedure_base_8cs_source.html#l00030">ProcedureBase.cs:30</a></div></div>
<div class="ttc" id="namespace_unity_engine_html"><div class="ttname"><a href="namespace_unity_engine.html">UnityEngine</a></div></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="dir_84bbf7b3c7f28a5a18725745e1505219.html">Assets</a></li><li class="navelem"><a class="el" href="dir_f13b41af88cf68434578284aaf699e39.html">Scripts</a></li><li class="navelem"><a class="el" href="dir_7db68f476bd50f9f6d9cf398af037e8e.html">Core</a></li><li class="navelem"><b>ProcedureBase.cs</b></li>
    <li class="footer">制作者
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.13 </li>
  </ul>
</div>
</body>
</html>
